package com.nami.gchat.domain.service;


import com.nami.gate.external.basic.bo.ConnectedUserBO;
import com.nami.gate.external.basic.cache.user.UserDeviceRel;

import com.nami.gchat.domain.model.co.GrpInfoModel;
import com.nami.gchat.domain.model.co.GrpMemberModel;
import com.nami.im.network.model.message.v2.Message;

import java.util.List;

public interface GrpChatDomainService {
    boolean validateUserPermission(UserDeviceRel user);
    boolean validateGrpParams(GrpInfoModel grpInfo);
    boolean validateMePermission(GrpMemberModel me);
    boolean validateBasicParams(ConnectedUserBO sender, Message message, String targetId);
    boolean publishMessageEvent(Integer qos,
                                ConnectedUserBO sender,
                                Message originalMsg,
                                List<GrpMemberModel> allMembers);
    boolean checkIdempotent(String appKey, String senderId,
                            String clientMsgId);
    void fillParam(String appKey, Message message);
}
